package com.hopu.v1.mapper.front.question;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hopu.v1.pojo.question.Questions;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Entity com.hopu.v1.pojo.question.Questions
 */
public interface FQuestionsMapper extends BaseMapper<Questions> {

    //根据学科查询所有题目
    List<Questions> selectAllBySubjectId(@Param("subjectId")Integer subjectId,@Param("question")Questions questions);

    //根据题库id查询所有题目id
    List<Integer> selectAllIdByQuestionsBanksIds(Questions questions);

    //根据题库id查询所有题目
    List<Questions> selectAllByQuestionsBanksId(Questions questions);

    //根据题目id获取对应题目
    List<Questions> selectAllById(@Param("ids")int[] ids,@Param("question")Questions questions);

    /**
     * 查询评论最多的题目
     * @param questions
     * @return
     */
    List<Questions> selectStudentAndComment(Questions questions);

    List<Questions> selectStudentComment(Questions questions);

}




